package com.my.swas.sso.module.admin.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.my.swas.common.base.ResponseResult;
import com.my.swas.common.jwt.JWTUtils;
import com.my.swas.sso.module.admin.entity.App;
import com.my.swas.sso.module.admin.service.AppService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @author: :MaYong
 */
@Slf4j
@Controller
@RequestMapping("admin/app")
public class AppController {
    @Resource
    AppService appService;

    @ResponseBody
    @GetMapping("appByCurrentUser")
    public ResponseResult getAppByCurrentUser(){
        List<App> apps = appService.getAppByCurrentUser();
        return ResponseResult.ok(apps);
    }
}
